xen/arm: vgic: Properly emulate the full register
authorJulien Grall <julien.grall@citrix.com>
Wed, 18 Nov 2015 17:28:00 +0000 (17:28 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 25 Nov 2015 12:29:28 +0000 (12:29 +0000)
commita2b83f95bfad7c3533629cc7f3935cccc8e2d63d
treea65245473660a2db6764c8f25b78c30e241791af
parent84ce5f4f3b17209346b5e80b6dc0cc2423fc084a
xen/arm: vgic: Properly emulate the full register

The offset in the emulation is based on byte. As most of the registers
are 64/32 bits, they will span over multiple bytes.

However, the current emulation only cares about the first offset. This
will result in not properly emulating any access on the register with
any other offset.

Introduce new macros to help implementing access on multiple byte and
use them over the vGIC emulation.

Note that I didn't convert the reserved/implementation defined
registers. It will be done in a follow-up.

Signed-off-by: Julien Grall <julien.grall@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/vgic-v2.c
xen/arch/arm/vgic-v3.c
xen/include/asm-arm/vgic-emul.h [new file with mode: 0644]